package cn.supermarket.pojo.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.*;
import java.io.Serializable;

@Data
public class AdminAddNewDTO implements Serializable {
    @NotNull(message = "请提交姓名！")
    private String name;
    @NotNull(message = "请提交年龄！")
    //@Range(min = 0,max = 100,message = "年龄在0~100之间")
    private Integer age;
    @NotNull(message = "请选择性别！")
    private String gender;
    @NotNull(message = "请提交用户名！")
    //@Length(min = 5,max = 15,message = "用户名长度大于5,小于15")
    private String username;
    @NotNull(message = "请提交密码！")
    //@Length(min = 6,max = 25,message = "密码长度大于6,小于25")
    private String password;
    private String avatar;
    @NotNull(message = "请提交电话！")
   // @Pattern(regexp = "/^1(3\\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$/",message = "请输入正确的电话号码")
    private String phone;
    //@Email(message = "请输入正确的电子邮箱!")
    private String email;
    @NotNull(message = "请选择职位！")
    private String position;
}
